package com.cj.mobile.iabp.mvp.model.entity;

import android.os.Parcel;
import android.os.Parcelable;

/**
 * @ProjectName: AptitudeAndroid
 * @Package: com.cj.mobile.iabp.mvp.model.entity
 * @ClassName: PaymentRecordsInfo
 * @Description: 用款记录
 * @Author: WLY
 * @CreateDate: 2024/3/13 19:35
 */
public class PaymentRecordsInfo implements Parcelable {
    public PaymentRecordsInfo() {
    }

    public PaymentRecordsInfo(String loanDate, double creditAmount, String loanEndDate, double returnCreditAmount, double interest) {
        this.loanDate = loanDate;
        this.creditAmount = creditAmount;
        this.loanEndDate = loanEndDate;
        this.returnCreditAmount = returnCreditAmount;
        this.interest = interest;
    }

    // 借款日期
    private String loanDate;
    // 借款金额
    private double creditAmount;
    // 还款日期
    private String loanEndDate;
    // 应还金额
    private double returnCreditAmount;
    // 利息
    private double interest;

    public String getLoanDate() {
        return loanDate;
    }

    public void setLoanDate(String loanDate) {
        this.loanDate = loanDate;
    }

    public double getCreditAmount() {
        return creditAmount;
    }

    public void setCreditAmount(double creditAmount) {
        this.creditAmount = creditAmount;
    }

    public String getLoanEndDate() {
        return loanEndDate;
    }

    public void setLoanEndDate(String loanEndDate) {
        this.loanEndDate = loanEndDate;
    }

    public double getReturnCreditAmount() {
        return returnCreditAmount;
    }

    public void setReturnCreditAmount(double returnCreditAmount) {
        this.returnCreditAmount = returnCreditAmount;
    }

    public double getInterest() {
        return interest;
    }

    public void setInterest(double interest) {
        this.interest = interest;
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeString(this.loanDate);
        dest.writeDouble(this.creditAmount);
        dest.writeString(this.loanEndDate);
        dest.writeDouble(this.returnCreditAmount);
        dest.writeDouble(this.interest);
    }

    public void readFromParcel(Parcel source) {
        this.loanDate = source.readString();
        this.creditAmount = source.readDouble();
        this.loanEndDate = source.readString();
        this.returnCreditAmount = source.readDouble();
        this.interest = source.readDouble();
    }

    protected PaymentRecordsInfo(Parcel in) {
        this.loanDate = in.readString();
        this.creditAmount = in.readDouble();
        this.loanEndDate = in.readString();
        this.returnCreditAmount = in.readDouble();
        this.interest = in.readDouble();
    }

    public static final Parcelable.Creator<PaymentRecordsInfo> CREATOR = new Parcelable.Creator<PaymentRecordsInfo>() {
        @Override
        public PaymentRecordsInfo createFromParcel(Parcel source) {
            return new PaymentRecordsInfo(source);
        }

        @Override
        public PaymentRecordsInfo[] newArray(int size) {
            return new PaymentRecordsInfo[size];
        }
    };
}
